Optimal. Leaf size=474 \[ -\frac {f \left (a+c x^2\right )^p (g+h x)^{-2 p} \left (1-\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p} \left (1-\frac {g+h x}{\frac {\sqrt {-a} h}{\sqrt {c}}+g}\right )^{-p} F_1\left (-2 p;-p,-p;1-2 p;\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}},\frac {g+h x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )}{2 h^3 p}-\frac {\left (a+c x^2\right )^{p+1} (g+h x)^{-2 (p+1)} \left (d h^2-e g h+f g^2\right )}{2 h (p+1) \left (a h^2+c g^2\right )}+\frac {\left (\sqrt {-a}-\sqrt {c} x\right ) \left (a+c x^2\right )^p (g+h x)^{-2 p-1} \left (-\frac {\left (\sqrt {-a}+\sqrt {c} x\right ) \left (\sqrt {-a} h+\sqrt {c} g\right )}{\left (\sqrt {-a}-\sqrt {c} x\right ) \left (\sqrt {c} g-\sqrt {-a} h\right )}\right )^{-p} \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \, _2F_1\left (-2 p-1,-p;-2 p;\frac {2 \sqrt {-a} \sqrt {c} (g+h x)}{\left (\sqrt {c} g-\sqrt {-a} h\right ) \left (\sqrt {-a}-\sqrt {c} x\right )}\right )}{h^2 (2 p+1) \left (\sqrt {-a} h+\sqrt {c} g\right ) \left (a h^2+c g^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.52, antiderivative size = 474, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {1656, 760, 133, 807, 727} \[ -\frac {f \left (a+c x^2\right )^p (g+h x)^{-2 p} \left (1-\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p} \left (1-\frac {g+h x}{\frac {\sqrt {-a} h}{\sqrt {c}}+g}\right )^{-p} F_1\left (-2 p;-p,-p;1-2 p;\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}},\frac {g+h x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )}{2 h^3 p}+\frac {\left (\sqrt {-a}-\sqrt {c} x\right ) \left (a+c x^2\right )^p (g+h x)^{-2 p-1} \left (-\frac {\left (\sqrt {-a}+\sqrt {c} x\right ) \left (\sqrt {-a} h+\sqrt {c} g\right )}{\left (\sqrt {-a}-\sqrt {c} x\right ) \left (\sqrt {c} g-\sqrt {-a} h\right )}\right )^{-p} \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \, _2F_1\left (-2 p-1,-p;-2 p;\frac {2 \sqrt {-a} \sqrt {c} (g+h x)}{\left (\sqrt {c} g-\sqrt {-a} h\right ) \left (\sqrt {-a}-\sqrt {c} x\right )}\right )}{h^2 (2 p+1) \left (\sqrt {-a} h+\sqrt {c} g\right ) \left (a h^2+c g^2\right )}-\frac {\left (a+c x^2\right )^{p+1} (g+h x)^{-2 (p+1)} \left (d h^2-e g h+f g^2\right )}{2 h (p+1) \left (a h^2+c g^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 133
Rule 727
Rule 760
Rule 807
Rule 1656
Rubi steps
\begin {align*} \int (g+h x)^{-3-2 p} \left (a+c x^2\right )^p \left (d+e x+f x^2\right ) \, dx &=\frac {\int (g+h x)^{-3-2 p} \left (-f g^2+d h^2-h (2 f g-e h) x\right ) \left (a+c x^2\right )^p \, dx}{h^2}+\frac {f \int (g+h x)^{-1-2 p} \left (a+c x^2\right )^p \, dx}{h^2}\\ &=-\frac {\left (f g^2-e g h+d h^2\right ) (g+h x)^{-2 (1+p)} \left (a+c x^2\right )^{1+p}}{2 h \left (c g^2+a h^2\right ) (1+p)}-\frac {\left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \int (g+h x)^{-2-2 p} \left (a+c x^2\right )^p \, dx}{h^2 \left (c g^2+a h^2\right )}+\frac {\left (f \left (a+c x^2\right )^p \left (1-\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p} \left (1-\frac {g+h x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p}\right ) \operatorname {Subst}\left (\int x^{-1-2 p} \left (1-\frac {x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^p \left (1-\frac {x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^p \, dx,x,g+h x\right )}{h^3}\\ &=-\frac {\left (f g^2-e g h+d h^2\right ) (g+h x)^{-2 (1+p)} \left (a+c x^2\right )^{1+p}}{2 h \left (c g^2+a h^2\right ) (1+p)}-\frac {f (g+h x)^{-2 p} \left (a+c x^2\right )^p \left (1-\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p} \left (1-\frac {g+h x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )^{-p} F_1\left (-2 p;-p,-p;1-2 p;\frac {g+h x}{g-\frac {\sqrt {-a} h}{\sqrt {c}}},\frac {g+h x}{g+\frac {\sqrt {-a} h}{\sqrt {c}}}\right )}{2 h^3 p}+\frac {\left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \left (\sqrt {-a}-\sqrt {c} x\right ) \left (-\frac {\left (\sqrt {c} g+\sqrt {-a} h\right ) \left (\sqrt {-a}+\sqrt {c} x\right )}{\left (\sqrt {c} g-\sqrt {-a} h\right ) \left (\sqrt {-a}-\sqrt {c} x\right )}\right )^{-p} (g+h x)^{-1-2 p} \left (a+c x^2\right )^p \, _2F_1\left (-1-2 p,-p;-2 p;\frac {2 \sqrt {-a} \sqrt {c} (g+h x)}{\left (\sqrt {c} g-\sqrt {-a} h\right ) \left (\sqrt {-a}-\sqrt {c} x\right )}\right )}{h^2 \left (\sqrt {c} g+\sqrt {-a} h\right ) \left (c g^2+a h^2\right ) (1+2 p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 2.85, size = 0, normalized size = 0.00 \[ \int (g+h x)^{-3-2 p} \left (a+c x^2\right )^p \left (d+e x+f x^2\right ) \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.52, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (f x^{2} + e x + d\right )} {\left (c x^{2} + a\right )}^{p} {\left (h x + g\right )}^{-2 \, p - 3}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (f x^{2} + e x + d\right )} {\left (c x^{2} + a\right )}^{p} {\left (h x + g\right )}^{-2 \, p - 3}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.05, size = 0, normalized size = 0.00 \[ \int \left (f \,x^{2}+e x +d \right ) \left (c \,x^{2}+a \right )^{p} \left (h x +g \right )^{-2 p -3}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (f x^{2} + e x + d\right )} {\left (c x^{2} + a\right )}^{p} {\left (h x + g\right )}^{-2 \, p - 3}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (c\,x^2+a\right )}^p\,\left (f\,x^2+e\,x+d\right )}{{\left (g+h\,x\right )}^{2\,p+3}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________